#!/bin/bash -l

## Choix du compilo : openmpi ou intel 
export COMPILO="OpenMPI"

## openmpi et compilateur gnu c++
export OUTPUT_FILE=../bin/samebatch-multiproduct-binpacking
export MPICC_CMD="g++"
export MPICC_OPTIM_PARAM="-O3"

# COMPILATION OPTIMALE
export MPICC_PARAM="${MPICC_PARAM} ${MPICC_OPTIM_PARAM} -w -o ${OUTPUT_FILE}"

# COMPILATION AVEC DEBUG
#export MPICC_PARAM="${MPICC_PARAM} -g -o ${OUTPUT_FILE}"

# script pouvant etre executer depuis le repertoire parent par 
# la commande script/compilempi
# ou depuis le repertoire src (pour emacs, commande M-x compile)
if [ -d "src" ]; then
    cd src
fi

pwd

export SRC_FILE="gsearchnode.cpp gsolverBBPv3NoWait.cpp gsupplyLinkSolution.cpp main.cpp gsolverBBPv3.cpp gsolverBBPv3NoWaitMaster.cpp gsupplyLinkProblem.cpp gsupplyLinkSolutionPartial.cpp"
echo ${MPICC_CMD} ${MPICC_PARAM} ${SRC_FILE}
${MPICC_CMD} ${MPICC_PARAM} ${SRC_FILE}

